3.1047 \(\int \frac{x^{-1+3 n} (a+b x^n)}{c+d x^n} \, dx\)

Optimal. Leaf size=86 \[ -\frac{c^2 (b c-a d) \log \left (c+d x^n\right )}{d^4 n}+\frac{c x^n (b c-a d)}{d^3 n}-\frac{x^{2 n} (b c-a d)}{2 d^2 n}+\frac{b x^{3 n}}{3 d n} \]

[Out]

(c*(b*c - a*d)*x^n)/(d^3*n) - ((b*c - a*d)*x^(2*n))/(2*d^2*n) + (b*x^(3*n))/(3*d*n) - (c^2*(b*c - a*d)*Log[c +
 d*x^n])/(d^4*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0755024, antiderivative size = 86, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {446, 77} \[ -\frac{c^2 (b c-a d) \log \left (c+d x^n\right )}{d^4 n}+\frac{c x^n (b c-a d)}{d^3 n}-\frac{x^{2 n} (b c-a d)}{2 d^2 n}+\frac{b x^{3 n}}{3 d n} \]

Antiderivative was successfully verified.

[In]

Int[(x^(-1 + 3*n)*(a + b*x^n))/(c + d*x^n),x]

[Out]

(c*(b*c - a*d)*x^n)/(d^3*n) - ((b*c - a*d)*x^(2*n))/(2*d^2*n) + (b*x^(3*n))/(3*d*n) - (c^2*(b*c - a*d)*Log[c +
 d*x^n])/(d^4*n)

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin{align*} \int \frac{x^{-1+3 n} \left (a+b x^n\right )}{c+d x^n} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^2 (a+b x)}{c+d x} \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{c (b c-a d)}{d^3}+\frac{(-b c+a d) x}{d^2}+\frac{b x^2}{d}-\frac{c^2 (b c-a d)}{d^3 (c+d x)}\right ) \, dx,x,x^n\right )}{n}\\ &=\frac{c (b c-a d) x^n}{d^3 n}-\frac{(b c-a d) x^{2 n}}{2 d^2 n}+\frac{b x^{3 n}}{3 d n}-\frac{c^2 (b c-a d) \log \left (c+d x^n\right )}{d^4 n}\\ \end{align*}

Mathematica [A]  time = 0.0774008, size = 78, normalized size = 0.91 \[ \frac{-\frac{c^2 (b c-a d) \log \left (c+d x^n\right )}{d^4}+\frac{c x^n (b c-a d)}{d^3}-\frac{x^{2 n} (b c-a d)}{2 d^2}+\frac{b x^{3 n}}{3 d}}{n} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^(-1 + 3*n)*(a + b*x^n))/(c + d*x^n),x]

[Out]

((c*(b*c - a*d)*x^n)/d^3 - ((b*c - a*d)*x^(2*n))/(2*d^2) + (b*x^(3*n))/(3*d) - (c^2*(b*c - a*d)*Log[c + d*x^n]
)/d^4)/n

________________________________________________________________________________________

Maple [A]  time = 0.023, size = 125, normalized size = 1.5 \begin{align*}{\frac{b \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{3}}{3\,dn}}+{\frac{ \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}a}{2\,dn}}-{\frac{ \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}bc}{2\,{d}^{2}n}}-{\frac{c{{\rm e}^{n\ln \left ( x \right ) }}a}{{d}^{2}n}}+{\frac{{c}^{2}{{\rm e}^{n\ln \left ( x \right ) }}b}{{d}^{3}n}}+{\frac{{c}^{2}\ln \left ( c+d{{\rm e}^{n\ln \left ( x \right ) }} \right ) a}{{d}^{3}n}}-{\frac{{c}^{3}\ln \left ( c+d{{\rm e}^{n\ln \left ( x \right ) }} \right ) b}{{d}^{4}n}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1+3*n)*(a+b*x^n)/(c+d*x^n),x)

[Out]

1/3*b/d/n*exp(n*ln(x))^3+1/2/d/n*exp(n*ln(x))^2*a-1/2/d^2/n*exp(n*ln(x))^2*b*c-c/d^2/n*exp(n*ln(x))*a+c^2/d^3/
n*exp(n*ln(x))*b+c^2/d^3/n*ln(c+d*exp(n*ln(x)))*a-c^3/d^4/n*ln(c+d*exp(n*ln(x)))*b

________________________________________________________________________________________

Maxima [A]  time = 0.960865, size = 151, normalized size = 1.76 \begin{align*} -\frac{1}{6} \, b{\left (\frac{6 \, c^{3} \log \left (\frac{d x^{n} + c}{d}\right )}{d^{4} n} - \frac{2 \, d^{2} x^{3 \, n} - 3 \, c d x^{2 \, n} + 6 \, c^{2} x^{n}}{d^{3} n}\right )} + \frac{1}{2} \, a{\left (\frac{2 \, c^{2} \log \left (\frac{d x^{n} + c}{d}\right )}{d^{3} n} + \frac{d x^{2 \, n} - 2 \, c x^{n}}{d^{2} n}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+3*n)*(a+b*x^n)/(c+d*x^n),x, algorithm="maxima")

[Out]

-1/6*b*(6*c^3*log((d*x^n + c)/d)/(d^4*n) - (2*d^2*x^(3*n) - 3*c*d*x^(2*n) + 6*c^2*x^n)/(d^3*n)) + 1/2*a*(2*c^2
*log((d*x^n + c)/d)/(d^3*n) + (d*x^(2*n) - 2*c*x^n)/(d^2*n))

________________________________________________________________________________________

Fricas [A]  time = 1.08035, size = 170, normalized size = 1.98 \begin{align*} \frac{2 \, b d^{3} x^{3 \, n} - 3 \,{\left (b c d^{2} - a d^{3}\right )} x^{2 \, n} + 6 \,{\left (b c^{2} d - a c d^{2}\right )} x^{n} - 6 \,{\left (b c^{3} - a c^{2} d\right )} \log \left (d x^{n} + c\right )}{6 \, d^{4} n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+3*n)*(a+b*x^n)/(c+d*x^n),x, algorithm="fricas")

[Out]

1/6*(2*b*d^3*x^(3*n) - 3*(b*c*d^2 - a*d^3)*x^(2*n) + 6*(b*c^2*d - a*c*d^2)*x^n - 6*(b*c^3 - a*c^2*d)*log(d*x^n
 + c))/(d^4*n)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+3*n)*(a+b*x**n)/(c+d*x**n),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b x^{n} + a\right )} x^{3 \, n - 1}}{d x^{n} + c}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+3*n)*(a+b*x^n)/(c+d*x^n),x, algorithm="giac")

[Out]

integrate((b*x^n + a)*x^(3*n - 1)/(d*x^n + c), x)